package bojin.studio.cpbl;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

public class mainActivity extends TabActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        final TabHost tabHost = getTabHost();

        tabHost.addTab(tabHost.newTabSpec("tab1")
                .setIndicator("",getResources().getDrawable(R.drawable.cpbl))
                .setContent(new Intent(this, cpbl.class)));

        tabHost.addTab(tabHost.newTabSpec("tab2")
                .setIndicator("",getResources().getDrawable(R.drawable.lion))
                .setContent(new Intent(this, lion.class)));
        
        tabHost.addTab(tabHost.newTabSpec("tab3")
                .setIndicator("",getResources().getDrawable(R.drawable.elephant))
                .setContent(new Intent(this, elephant.class)));
        
        tabHost.addTab(tabHost.newTabSpec("tab4")
                .setIndicator("",getResources().getDrawable(R.drawable.lamigo))
                .setContent(new Intent(this, lamigo.class)));
        
        // This tab sets the intent flag so that it is recreated each time
        // the tab is clicked.
        tabHost.addTab(tabHost.newTabSpec("tab5")
                .setIndicator("",getResources().getDrawable(R.drawable.sinon))
                .setContent(new Intent(this, sinon.class)
                        .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
    }
}